﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PoolGame2.Controls
{

    public enum ControlActions
    {
        DPAD_UP, 
        DPAD_DOWN, 
        DPAD_LEFT,
        DPAD_RIGHT,
        CAMERA_CYCLE_UP, 
        CAMERA_CYCLE_DOWN, 
        MOUSE_RIGHT_CLICK,
        START_SHOT, 
        END_SHOT, 
        ANALOG2_MOVE, 
        SWITCH_TRACKING, 
        MOVE_FORWARD, 
        MOVE_BACK, 
        STRAFE_LEFT,
        STRAFE_RIGHT, 
        CUE_TIP_MOVEMENT,
        CUE_MOVEMENT,
        REPLAY_YES,
        REPLAY_NO,
        DEBUG_SWITCH, 
        DEBUG_CUSHION_EDIT_MODE,
        DEBUG_FAST_MOVE,
        DEBUG_1,
        DEBUG_2,
        DEBUG_3,
        DEBUG_4,
        DEBUG_5,
        DEBUG_6,
        DEBUG_7,
        DEBUG_8,
        DEBUG_9,
        DEBUG_0,
        DEBUG_L,
        DEBUG_U,
        DEBUG_D,
        DEBUG_R,
    };

    public class GameControlAction
    {
        ControlActions action;
        private Dictionary<String, Object> properties;

        public GameControlAction(ControlActions a)
        {
            this.action = a;
        }

        public ControlActions GetAction()
        {
            return action;
        }

        public void AddProperty(String key, Object value)
        {
            if (properties == null)
            {
                properties = new Dictionary<String, Object>();
            }
            properties.Add(key, value);
        }

        public Object GetProperty(String key)
        {
            if (properties == null)
            {
                return null;
            } 
            else 
            {
                Object val;
                if (properties.TryGetValue(key, out val)) {
                    return val;
                }
            }
            return null;
        }

    }
}
